1. Field of the Invention
The present invention relates to a data processing device which processes variable length code, and, more particularly, the present invention relates to a data processing device that decreases the processing time required to load variable length code from memory and the processing time required to store variable length code to memory.
2. Description of the Related Art
In the field of media processing, when storing large volume data such as image and audio data in a memory device or transmitting such data to another device, data compression is generally employed to make effective use of resources. Various methods of data compression have been proposed and executed, however, in nearly all methods, the compressed data is variable length code (abbreviated "VLC" hereinafter). Huffman code is one such representative method for compressing data resulting in variable length code.
When using custom hardware to conduct processing that compresses media data into VLC data, and restoring VLC data to media data, software has been used to improve the performance of the custom hardware processor.
A problem encountered in using the instruction set of a general processor is that it is not suitable to handle VLC due to the fragmentary length of the VLC. For example, the load/store instruction of general processors normally targets byte unit data that is byte aligned, and therefore, to configure VLC data that extends across a word boundary into a general register, two loads and several shift and logical calculations are required. In addition, because the number of required loads depends on the VLC lead offset and VLC length, a condition determination operation must be executed several times.
In this way, when using the instruction set of a conventional general processor to process VLC load/store operations, many instructions are necessary, and therefore, it is likely that this will create a significant performance overhead.
The present invention has the purpose of addressing the problems encountered in manipulating VLC data, and resolving these problems by offering a variable length code processing mechanism suitable for handling VLC data.